package com.ytc.teaching.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ytc.commons.model.dto.PageRequest;
import com.ytc.commons.model.vo.PageResponseResult;
import com.ytc.commons.model.vo.ResponseResult;
import com.ytc.teaching.domain.Comment;
import com.ytc.teaching.domain.WorkRecord;
import com.ytc.teaching.mappers.CommentMapper;
import com.ytc.teaching.mappers.WorkRecordMapper;
import com.ytc.teaching.service.CommentService;
import com.ytc.teaching.service.WorkRecordService;
import com.ytc.teaching.service.WorkService;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jiuye
 * @since 2022-10-10
 */
@Service
public class WorkRecordServiceImpl extends ServiceImpl<WorkRecordMapper, WorkRecord> implements WorkRecordService {

    @Override
    public ResponseResult teachplan(PageRequest request) {
            Integer pageNo = request.getPageNo();
            Integer pageSize = request.getPageSize();
            Page<WorkRecord> page = new Page<>(pageNo,pageSize);
        Page<WorkRecord> page1 = this.page(page, null);
        return PageResponseResult.okResult(page1.getTotal(),page1.getRecords());

    }
}
